package main

import (
	"api/handlers"
	"time"

	"github.com/kataras/iris/v12"
)

func main() {

	app := iris.New()

	app.Get("/api/search/", handlers.ElasticHandler)
	app.Get("/api/graph/vertex/", handlers.GremlinGetVertexHandler)
	// app.Get("/api/graph/edge/")
	// app.Get("/api/graph/shortestpath/")
	// app.Get("/api/graph/expand/")

	app.Get("/", func(ctx iris.Context) {

		var server = map[string]interface{}{
			"server":   "Studio API Server",
			"datetime": time.Now(),
			"status":   "ok",
		}

		ctx.JSON(server)

	})
	app.Run(iris.Addr(":8080"), iris.WithConfiguration(iris.YAML("./config/iris.yaml")))

}
